// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ITaskBinding.cs" company="JDML Consulting Ltd.">
//   Copyright 2011 Photon Project - http://photon.codeplex.com
// </copyright>
// <summary>
//   Represents the asynchronous binding pattern for a <see cref="Task" />.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Photon.Threading.EventPattern
{
    using System;

    /// <summary>
    /// Represents the asynchronous binding pattern for a <see cref="Task"/>.
    /// </summary>
    public interface ITaskBinding
    {
        IAsyncResult Begin(AsyncCallback callBack);
        void End(IAsyncResult asyncResult);
        bool IsAsync { get; }
    }

    public interface ITaskBinding<out T>
    {
        IAsyncResult Begin(AsyncCallback callBack);
        T End(IAsyncResult asyncResult);
        bool IsAsync { get; }
    }
}